#include <stdio.h> //优先查找系统路径
#include<string.h>
#include "Student.h" //优先从当前路径查下查找
#include "Teacher.h"

bool IsNameEqual(Stu *s,void *value)
{
    char* name=(char*)name;
    return strcmp(s->Name,name)==0;
}

bool IsAgeEqual(Stu *s,void *value)
{
    return s->age==(int)value;
}

bool IsScoreGreater(Stu *s,void *value)
{
    return s->score>=*(double*)value;
}
int main()
{
    Teach t;

    InitTeacher(&t,"zhangsan",40);

    InsertStu(&t,"李四",1,20,99);
    InsertStu(&t,"王五",2,21,98);
    InsertStu(&t,"赵六",3,22,100);

    //PrintTeacher(&t);
    //回调：提高代码的复用性

    // RemoveStu(&t,"王五");
    // PrintTeacher(&t);

    double score=98;
    Stu *s=FindFirstStu(&t,&score,IsScoreGreater);
    if(s)
    {
        PrintStu(s);
    }
    else
    {
        printf("没找到!\n");
    }
    return 0;
}

